<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../../../images/favicon.ico">
	<!-- 引入header -->
    <include file="Public/header" />
    <!-- 结束 -->
  
  <!-- Main Navbar -->
  <div class="main-nav">  	
	   <nav class="navbar navbar-expand-lg">
          <div class="collapse navbar-collapse" id="navbarNavDropdown">
            <ul class="navbar-nav">
              <li class="nav-item ">
                <a class="nav-link" href="/admin.php"><span class="active-item-here"></span><i class="fa fa-dashboard mr-5"></i> <span>仪表盘</span></a>
              </li>
              <li class="nav-item dropdown">

                <a class="nav-link dropdown-toggle" href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                  <i class="fa fa-th mr-5"></i><span>应用中心</span>
                </a>                  
                <ul class="dropdown-menu multilevel scale-up-left">
                	<li class="nav-item"><a class="nav-link" href="{:U('tools/index')}">应用管理</a></li>
                	<li class="nav-item"><a class="nav-link" href="{:U('tools/add')}">新增应用</a></li>     
                	<li class="nav-item"><a class="nav-link  href="{:U('tools/classe')}">分类管理</a></li> 
                  <li class="nav-item"><a class="nav-link" href="{:U('tools/link')}">友链管理</a></li>
                  <li class="nav-item"><a class="nav-link" href="{:U('tools/menu')}">导航管理</a></li>            
                </ul>                 
              </li> 
              
              <li class="nav-item dropdown m-menu m-fix  active">
                <a class="nav-link dropdown-toggle" href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                  <i class="fa fa-table mr-5"></i>  <span class="active-item-here"></span><span>系统设置</span>
                </a>
                <div class="dropdown-menu menu-mega mega-menu-auto scale-up-left">
                    <ul class="dropdown-menu multilevel scale-up-left">
                        <li>
                            <a class="nav-link" href="{:U('system/index')}" title=""><i class="fa fa-creative-commons mr-15"></i>基础设置</a>
                        </li>
                        <li>
                            <a class="nav-link active" href="{:U('system/upinfo')}" title=""><i class="fa fa-address-card-o mr-15"></i>信息修改</a>
                        </li>
                         <li>
                            <a class="nav-link" href="{:U('system/temp')}" title=""><i class="fa fa-cubes mr-15"></i>模板设置</a>
                        </li>
                       <!--  -->
                    </ul><!-- /.menu-mega-child one-four -->
                          
                    
                </div>
                  
              </li>
              
              <li class="nav-item dropdown m-menu">
                <a class="nav-link" href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                  <i class="fa fa-laptop mr-5"></i> <span>应用商店</span>
                </a>
                <div class="dropdown-menu menu-mega scale-up-down">
                  
                    
                </div>
                  
              </li>               
              <li class="nav-item dropdown">
                <a class="nav-link" href="{:U('update/index')}">
                  <i class="fa fa-puzzle-piece mr-5"></i>检查更新
                </a>
              </li>
               
            </ul>
          </div>
        </nav>  	  
  </div>

  

  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <h1>
        修改管理员信息
      </h1>
      <ol class="breadcrumb">
        <li class="breadcrumb-item"><a href="/admin.php"><i class="fa fa-dashboard"></i> 仪表盘</a></li>
        <li class="breadcrumb-item"><a href="#">系统设置</a></li>
        <li class="breadcrumb-item active">修改信息</li>
      </ol>
    </section>

    <!-- Main content -->
    <section class="content">
    	
		<div class="row">
			<div class="box">
            <div class="box-header with-border">
              <h4 class="box-title">修改管理员信息</h4>
            </div>
            <!-- /.box-header -->
            <!-- form start -->
            <form id="f" enctype="multipart/form-data" class="form-horizontal form-element">
              <div class="box-body">
              	
                <div class="form-group row">
                  <label for="inputEmail3" class="col-sm-2 control-label"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">帐号</font></font></label>

                  <div class="col-sm-10">
                    <input type="text" class="form-control" id="email" name="email" placeholder="管理员帐号" value="{$re.email}">
                  </div>
                </div>
                <div class="form-group row">
                  <label for="inputEmail3" class="col-sm-2 control-label"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">密码</font></font></label>

                  <div class="col-sm-10">
                    <input type="password" class="form-control" id="pass" name="pass" placeholder="密码如需修改请填，不修改不填" value="">
                  </div>
                </div>
                <div class="form-group row">
                  <label for="inputEmail3" class="col-sm-2 control-label"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">昵称</font></font></label>

                  <div class="col-sm-10">
                    <input type="text" class="form-control" id="name" name="name" placeholder="管理员以及工具箱作者的昵称" value="{$re.name}">
                  </div>
                </div>
                <div class="form-group row">
                  <label for="inputEmail3" class="col-sm-2 control-label"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">QQ</font></font></label>

                  <div class="col-sm-10">
                    <input type="text" class="form-control" id="qq" name="qq" placeholder="管理员QQ" value="{$re.qq}">
                  </div>
                </div>
                
              <!-- /.box-body -->
              <div class="box-footer">
                <a href="{:U('index/index')}" class="btn btn-default"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">取消</font></font></a>
                <button type="button" id="classedit" class="btn btn-info pull-right"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">提交</font></font></button>
              </div>
              <!-- /.box-footer -->
            </form>
          </div>

        <!-- left column -->
        
        
      </div>
      <!-- /.row -->
      
    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->
  
	<include file="Public/footer" />
	<script src="__PUBLIC__/Admin/js/layer/layer.js"></script>
	<script type="text/javascript">
	   	$("#classedit").click(function(){
	   		var formData=new FormData(document.getElementById("f"));
        
	  		var e =0;
	    	
	    	var index = layer.load(1, {shade: false}); //0代表加载的风格，支持0-2
			
      
      $.ajax({  
           url: '{:U('system/upinfo')}' ,  
           type: 'POST',  
           data: formData,  
           dataType:'json',
           async: false,  
           cache: false,  
           contentType: false,  
           processData: false,  

           success: function (data) {
               if(data.status == 1){
                  layer.closeAll('loading');
                   //判断返回的status来确定文件是否上传成功，以及上传成功后要做的操作
                    layer.alert(data.info, { icon: 6 });  
                    window.location.reload();
               }
               if(data.status == 0){
                  layer.closeAll('loading');
                  layer.alert(data.info, { icon: 5 });  
               }
               alert(response.msg);  
           },  
      });  
		});
	</script>
	
</body>
</html>
